<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
      <el-form-item label="项目id" prop="projectId">
        <el-input v-model="queryParams.projectId" placeholder="请输入项目id" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <!-- <el-form-item label="桩机设备id" prop="equipmentId">
        <el-input v-model="queryParams.equipmentId" placeholder="请输入桩机设备id" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="桩位编号" prop="pileNo">
        <el-input v-model="queryParams.pileNo" placeholder="请输入桩位编号" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="操作模式" prop="operationMode">
        <el-input v-model="queryParams.operationMode" placeholder="请输入操作模式" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="方位角" prop="azimuthAngle">
        <el-input v-model="queryParams.azimuthAngle" placeholder="请输入方位角" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="俯仰角" prop="elevationAngle">
        <el-input v-model="queryParams.elevationAngle" placeholder="请输入俯仰角" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="滚动角" prop="rollingAngle">
        <el-input v-model="queryParams.rollingAngle" placeholder="请输入滚动角" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="经度" prop="longitude">
        <el-input v-model="queryParams.longitude" placeholder="请输入经度" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="纬度" prop="latitude">
        <el-input v-model="queryParams.latitude" placeholder="请输入纬度" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="X坐标/经度" prop="x">
        <el-input v-model="queryParams.x" placeholder="请输入X坐标/经度" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Y坐标/纬度" prop="y">
        <el-input v-model="queryParams.y" placeholder="请输入Y坐标/纬度" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="左前方撑脚高度" prop="leftFrontSupportHeight">
        <el-input v-model="queryParams.leftFrontSupportHeight" placeholder="请输入左前方撑脚高度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="右前方撑脚高度" prop="rightFrontSupportHeight">
        <el-input v-model="queryParams.rightFrontSupportHeight" placeholder="请输入右前方撑脚高度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="左后方撑脚高度" prop="leftRearSupportHeight">
        <el-input v-model="queryParams.leftRearSupportHeight" placeholder="请输入左后方撑脚高度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="右后方撑脚高度" prop="rightRearSupportHeight">
        <el-input v-model="queryParams.rightRearSupportHeight" placeholder="请输入右后方撑脚高度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="钻深" prop="drillingDepth">
        <el-input v-model="queryParams.drillingDepth" placeholder="请输入钻深" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="钻速" prop="drillingSpeed">
        <el-input v-model="queryParams.drillingSpeed" placeholder="请输入钻速" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="电流" prop="current">
        <el-input v-model="queryParams.current" placeholder="请输入电流" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="桩机东向速度" prop="eastSpeed">
        <el-input v-model="queryParams.eastSpeed" placeholder="请输入桩机东向速度" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="桩机北向速度" prop="northSpeed">
        <el-input v-model="queryParams.northSpeed" placeholder="请输入桩机北向速度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="桩机天向速度" prop="verticalSpeed">
        <el-input v-model="queryParams.verticalSpeed" placeholder="请输入桩机天向速度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="扩底直径" prop="expandedDiameter">
        <el-input v-model="queryParams.expandedDiameter" placeholder="请输入扩底直径" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="泵送次数" prop="pumpTimes">
        <el-input v-model="queryParams.pumpTimes" placeholder="请输入泵送次数" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="拉力" prop="tension">
        <el-input v-model="queryParams.tension" placeholder="请输入拉力" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="行走速度" prop="walkingSpeed">
        <el-input v-model="queryParams.walkingSpeed" placeholder="请输入行走速度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="转速" prop="revolutionsPerMinute">
        <el-input v-model="queryParams.revolutionsPerMinute" placeholder="请输入转速" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="履带角度" prop="trackAngle">
        <el-input v-model="queryParams.trackAngle" placeholder="请输入履带角度" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="前后角度" prop="frontBackAngleDeviation">
        <el-input v-model="queryParams.frontBackAngleDeviation" placeholder="请输入前后角度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="左右角度" prop="leftRightAngleDeviation">
        <el-input v-model="queryParams.leftRightAngleDeviation" placeholder="请输入左右角度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="内钻杆电流" prop="innerRodCurrent">
        <el-input v-model="queryParams.innerRodCurrent" placeholder="请输入内钻杆电流" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="内钻杆转速" prop="innerRodRpm">
        <el-input v-model="queryParams.innerRodRpm" placeholder="请输入内钻杆转速" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="进提钻速度" prop="advanceRetreatSpeed">
        <el-input v-model="queryParams.advanceRetreatSpeed" placeholder="请输入进提钻速度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="外钻杆速度" prop="outerRodSpeed">
        <el-input v-model="queryParams.outerRodSpeed" placeholder="请输入外钻杆速度" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="泵送混凝土压力" prop="concretePumpPressure">
        <el-input v-model="queryParams.concretePumpPressure" placeholder="请输入泵送混凝土压力" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="泵送混凝土重量" prop="concretePumpWeight">
        <el-input v-model="queryParams.concretePumpWeight" placeholder="请输入泵送混凝土重量" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="接收时间" prop="receptionTime">
        <el-date-picker clearable v-model="queryParams.receptionTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
          placeholder="请选择接收时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="创建人id" prop="creatorId">
        <el-input v-model="queryParams.creatorId" placeholder="请输入创建人id" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="创建人姓名" prop="creatorName">
        <el-input v-model="queryParams.creatorName" placeholder="请输入创建人姓名" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="最后修改人id" prop="lastUpdaterId">
        <el-input v-model="queryParams.lastUpdaterId" placeholder="请输入最后修改人id" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="最后修改人姓名" prop="lastUpdaterName">
        <el-input v-model="queryParams.lastUpdaterName" placeholder="请输入最后修改人姓名" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="最后修改时间" prop="lastUpdateTime">
        <el-date-picker clearable v-model="queryParams.lastUpdateTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
          placeholder="请选择最后修改时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="桩位统计编码" prop="pileCode">
        <el-input v-model="queryParams.pileCode" placeholder="请输入桩位统计编码" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>-->
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
          v-hasPermi="['pile:pilingMachineRecord:add']">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
          v-hasPermi="['pile:pilingMachineRecord:edit']">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
          v-hasPermi="['pile:pilingMachineRecord:remove']">删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
          v-hasPermi="['pile:pilingMachineRecord:export']">导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="pilingMachineRecordList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <!-- <el-table-column label="主键" align="center" prop="id" /> -->
      <el-table-column label="项目id" align="center" prop="projectId" />
      <el-table-column label="桩机设备id" align="center" prop="equipmentId" />
      <el-table-column label="桩位编号" align="center" prop="pileNo" />
      <el-table-column label="操作模式" align="center" prop="operationMode" />
      <el-table-column label="方位角" align="center" prop="azimuthAngle" />
      <el-table-column label="俯仰角" align="center" prop="elevationAngle" />
      <el-table-column label="滚动角" align="center" prop="rollingAngle" />
      <el-table-column label="经度" align="center" prop="longitude" />
      <el-table-column label="纬度" align="center" prop="latitude" />
      <el-table-column label="X坐标/经度" align="center" prop="x" />
      <el-table-column label="Y坐标/纬度" align="center" prop="y" />
      <el-table-column label="左前方撑脚高度" align="center" prop="leftFrontSupportHeight" />
      <el-table-column label="右前方撑脚高度" align="center" prop="rightFrontSupportHeight" />
      <el-table-column label="左后方撑脚高度" align="center" prop="leftRearSupportHeight" />
      <el-table-column label="右后方撑脚高度" align="center" prop="rightRearSupportHeight" />
      <el-table-column label="钻深" align="center" prop="drillingDepth" />
      <el-table-column label="钻速" align="center" prop="drillingSpeed" />
      <el-table-column label="电流" align="center" prop="current" />
      <el-table-column label="桩机东向速度" align="center" prop="eastSpeed" />
      <el-table-column label="桩机北向速度" align="center" prop="northSpeed" />
      <el-table-column label="桩机天向速度" align="center" prop="verticalSpeed" />
      <el-table-column label="钻孔状态 0 停止 1 开始" align="center" prop="drillingType" />
      <el-table-column label="钻孔提钻 0 停止 1 开始" align="center" prop="retreatType" />
      <el-table-column label="泵送状态 0 停止 1 开始" align="center" prop="pumpType" />
      <el-table-column label="扩底直径" align="center" prop="expandedDiameter" />
      <el-table-column label="泵送次数" align="center" prop="pumpTimes" />
      <el-table-column label="拉力" align="center" prop="tension" />
      <el-table-column label="行走速度" align="center" prop="walkingSpeed" />
      <el-table-column label="转速" align="center" prop="revolutionsPerMinute" />
      <el-table-column label="履带角度" align="center" prop="trackAngle" />
      <el-table-column label="前后角度" align="center" prop="frontBackAngleDeviation" />
      <el-table-column label="左右角度" align="center" prop="leftRightAngleDeviation" />
      <el-table-column label="定位状态" align="center" prop="positioningStatus" />
      <el-table-column label="天线状态" align="center" prop="antennaStatus" />
      <el-table-column label="压力状态" align="center" prop="pressureStatus" />
      <el-table-column label="重量状态" align="center" prop="weightStatus" />
      <el-table-column label="内钻杆电流" align="center" prop="innerRodCurrent" />
      <el-table-column label="内钻杆转速" align="center" prop="innerRodRpm" />
      <el-table-column label="进提钻速度" align="center" prop="advanceRetreatSpeed" />
      <el-table-column label="外钻杆速度" align="center" prop="outerRodSpeed" />
      <el-table-column label="泵送混凝土压力" align="center" prop="concretePumpPressure" />
      <el-table-column label="泵送混凝土重量" align="center" prop="concretePumpWeight" />
      <el-table-column label="接收时间" align="center" prop="receptionTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.receptionTime) }}</span>
        </template>
      </el-table-column>
      <!-- <el-table-column label="创建人id" align="center" prop="creatorId" /> -->
      <!-- <el-table-column label="创建人姓名" align="center" prop="creatorName" /> -->
      <!-- <el-table-column label="最后修改人id" align="center" prop="lastUpdaterId" /> -->
      <!-- <el-table-column label="最后修改人姓名" align="center" prop="lastUpdaterName" /> -->
      <!-- <el-table-column label="最后修改时间" align="center" prop="lastUpdateTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.lastUpdateTime) }}</span>
        </template>
      </el-table-column> -->
      <el-table-column label="桩位统计编码" align="center" prop="pileCode" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
            v-hasPermi="['pile:pilingMachineRecord:edit']">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
            v-hasPermi="['pile:pilingMachineRecord:remove']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />

    <!-- 添加或修改桩机运行记录对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="项目id" prop="projectId">
          <el-input v-model="form.projectId" placeholder="请输入项目id" />
        </el-form-item>
        <el-form-item label="桩机设备id" prop="equipmentId">
          <el-input v-model="form.equipmentId" placeholder="请输入桩机设备id" />
        </el-form-item>
        <el-form-item label="桩位编号" prop="pileNo">
          <el-input v-model="form.pileNo" placeholder="请输入桩位编号" />
        </el-form-item>
        <el-form-item label="操作模式" prop="operationMode">
          <el-input v-model="form.operationMode" placeholder="请输入操作模式" />
        </el-form-item>
        <el-form-item label="方位角" prop="azimuthAngle">
          <el-input v-model="form.azimuthAngle" placeholder="请输入方位角" />
        </el-form-item>
        <el-form-item label="俯仰角" prop="elevationAngle">
          <el-input v-model="form.elevationAngle" placeholder="请输入俯仰角" />
        </el-form-item>
        <el-form-item label="滚动角" prop="rollingAngle">
          <el-input v-model="form.rollingAngle" placeholder="请输入滚动角" />
        </el-form-item>
        <el-form-item label="经度" prop="longitude">
          <el-input v-model="form.longitude" placeholder="请输入经度" />
        </el-form-item>
        <el-form-item label="纬度" prop="latitude">
          <el-input v-model="form.latitude" placeholder="请输入纬度" />
        </el-form-item>
        <el-form-item label="X坐标/经度" prop="x">
          <el-input v-model="form.x" placeholder="请输入X坐标/经度" />
        </el-form-item>
        <el-form-item label="Y坐标/纬度" prop="y">
          <el-input v-model="form.y" placeholder="请输入Y坐标/纬度" />
        </el-form-item>
        <el-form-item label="左前方撑脚高度" prop="leftFrontSupportHeight">
          <el-input v-model="form.leftFrontSupportHeight" placeholder="请输入左前方撑脚高度" />
        </el-form-item>
        <el-form-item label="右前方撑脚高度" prop="rightFrontSupportHeight">
          <el-input v-model="form.rightFrontSupportHeight" placeholder="请输入右前方撑脚高度" />
        </el-form-item>
        <el-form-item label="左后方撑脚高度" prop="leftRearSupportHeight">
          <el-input v-model="form.leftRearSupportHeight" placeholder="请输入左后方撑脚高度" />
        </el-form-item>
        <el-form-item label="右后方撑脚高度" prop="rightRearSupportHeight">
          <el-input v-model="form.rightRearSupportHeight" placeholder="请输入右后方撑脚高度" />
        </el-form-item>
        <el-form-item label="钻深" prop="drillingDepth">
          <el-input v-model="form.drillingDepth" placeholder="请输入钻深" />
        </el-form-item>
        <el-form-item label="钻速" prop="drillingSpeed">
          <el-input v-model="form.drillingSpeed" placeholder="请输入钻速" />
        </el-form-item>
        <el-form-item label="电流" prop="current">
          <el-input v-model="form.current" placeholder="请输入电流" />
        </el-form-item>
        <el-form-item label="桩机东向速度" prop="eastSpeed">
          <el-input v-model="form.eastSpeed" placeholder="请输入桩机东向速度" />
        </el-form-item>
        <el-form-item label="桩机北向速度" prop="northSpeed">
          <el-input v-model="form.northSpeed" placeholder="请输入桩机北向速度" />
        </el-form-item>
        <el-form-item label="桩机天向速度" prop="verticalSpeed">
          <el-input v-model="form.verticalSpeed" placeholder="请输入桩机天向速度" />
        </el-form-item>
        <el-form-item label="扩底直径" prop="expandedDiameter">
          <el-input v-model="form.expandedDiameter" placeholder="请输入扩底直径" />
        </el-form-item>
        <el-form-item label="泵送次数" prop="pumpTimes">
          <el-input v-model="form.pumpTimes" placeholder="请输入泵送次数" />
        </el-form-item>
        <el-form-item label="拉力" prop="tension">
          <el-input v-model="form.tension" placeholder="请输入拉力" />
        </el-form-item>
        <el-form-item label="行走速度" prop="walkingSpeed">
          <el-input v-model="form.walkingSpeed" placeholder="请输入行走速度" />
        </el-form-item>
        <el-form-item label="转速" prop="revolutionsPerMinute">
          <el-input v-model="form.revolutionsPerMinute" placeholder="请输入转速" />
        </el-form-item>
        <el-form-item label="履带角度" prop="trackAngle">
          <el-input v-model="form.trackAngle" placeholder="请输入履带角度" />
        </el-form-item>
        <el-form-item label="前后角度" prop="frontBackAngleDeviation">
          <el-input v-model="form.frontBackAngleDeviation" placeholder="请输入前后角度" />
        </el-form-item>
        <el-form-item label="左右角度" prop="leftRightAngleDeviation">
          <el-input v-model="form.leftRightAngleDeviation" placeholder="请输入左右角度" />
        </el-form-item>
        <el-form-item label="内钻杆电流" prop="innerRodCurrent">
          <el-input v-model="form.innerRodCurrent" placeholder="请输入内钻杆电流" />
        </el-form-item>
        <el-form-item label="内钻杆转速" prop="innerRodRpm">
          <el-input v-model="form.innerRodRpm" placeholder="请输入内钻杆转速" />
        </el-form-item>
        <el-form-item label="进提钻速度" prop="advanceRetreatSpeed">
          <el-input v-model="form.advanceRetreatSpeed" placeholder="请输入进提钻速度" />
        </el-form-item>
        <el-form-item label="外钻杆速度" prop="outerRodSpeed">
          <el-input v-model="form.outerRodSpeed" placeholder="请输入外钻杆速度" />
        </el-form-item>
        <el-form-item label="泵送混凝土压力" prop="concretePumpPressure">
          <el-input v-model="form.concretePumpPressure" placeholder="请输入泵送混凝土压力" />
        </el-form-item>
        <el-form-item label="泵送混凝土重量" prop="concretePumpWeight">
          <el-input v-model="form.concretePumpWeight" placeholder="请输入泵送混凝土重量" />
        </el-form-item>
        <el-form-item label="接收时间" prop="receptionTime">
          <el-date-picker clearable v-model="form.receptionTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="请选择接收时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="创建人id" prop="creatorId">
          <el-input v-model="form.creatorId" placeholder="请输入创建人id" />
        </el-form-item>
        <el-form-item label="创建人姓名" prop="creatorName">
          <el-input v-model="form.creatorName" placeholder="请输入创建人姓名" />
        </el-form-item>
        <el-form-item label="最后修改人id" prop="lastUpdaterId">
          <el-input v-model="form.lastUpdaterId" placeholder="请输入最后修改人id" />
        </el-form-item>
        <el-form-item label="最后修改人姓名" prop="lastUpdaterName">
          <el-input v-model="form.lastUpdaterName" placeholder="请输入最后修改人姓名" />
        </el-form-item>
        <el-form-item label="最后修改时间" prop="lastUpdateTime">
          <el-date-picker clearable v-model="form.lastUpdateTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="请选择最后修改时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="桩位统计编码" prop="pileCode">
          <el-input v-model="form.pileCode" placeholder="请输入桩位统计编码" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listPilingMachineRecord, getPilingMachineRecord, delPilingMachineRecord, addPilingMachineRecord, updatePilingMachineRecord } from "@/api/pile/pilingMachineRecord";

export default {
  name: "PilingMachineRecord",
  data() {
    return {
      // 根路径
      baseURL: process.env.VUE_APP_BASE_API,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 桩机运行记录表格数据
      pilingMachineRecordList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        projectId: null,
        equipmentId: null,
        pileNo: null,
        operationMode: null,
        azimuthAngle: null,
        elevationAngle: null,
        rollingAngle: null,
        longitude: null,
        latitude: null,
        x: null,
        y: null,
        leftFrontSupportHeight: null,
        rightFrontSupportHeight: null,
        leftRearSupportHeight: null,
        rightRearSupportHeight: null,
        drillingDepth: null,
        drillingSpeed: null,
        current: null,
        eastSpeed: null,
        northSpeed: null,
        verticalSpeed: null,
        drillingType: null,
        retreatType: null,
        pumpType: null,
        expandedDiameter: null,
        pumpTimes: null,
        tension: null,
        walkingSpeed: null,
        revolutionsPerMinute: null,
        trackAngle: null,
        frontBackAngleDeviation: null,
        leftRightAngleDeviation: null,
        positioningStatus: null,
        antennaStatus: null,
        pressureStatus: null,
        weightStatus: null,
        innerRodCurrent: null,
        innerRodRpm: null,
        advanceRetreatSpeed: null,
        outerRodSpeed: null,
        concretePumpPressure: null,
        concretePumpWeight: null,
        receptionTime: null,
        creatorId: null,
        creatorName: null,
        lastUpdaterId: null,
        lastUpdaterName: null,
        lastUpdateTime: null,
        pileCode: null
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        id: [
          { required: true, message: "主键不能为空", trigger: "blur" }
        ],
        projectId: [
          { required: true, message: "项目id不能为空", trigger: "blur" }
        ],
        equipmentId: [
          { required: true, message: "桩机设备id不能为空", trigger: "blur" }
        ],
        pileNo: [
          { required: true, message: "桩位编号不能为空", trigger: "blur" }
        ],
        operationMode: [
          { required: true, message: "操作模式不能为空", trigger: "blur" }
        ],
        azimuthAngle: [
          { required: true, message: "方位角不能为空", trigger: "blur" }
        ],
        elevationAngle: [
          { required: true, message: "俯仰角不能为空", trigger: "blur" }
        ],
        rollingAngle: [
          { required: true, message: "滚动角不能为空", trigger: "blur" }
        ],
        longitude: [
          { required: true, message: "经度不能为空", trigger: "blur" }
        ],
        latitude: [
          { required: true, message: "纬度不能为空", trigger: "blur" }
        ],
        x: [
          { required: true, message: "X坐标/经度不能为空", trigger: "blur" }
        ],
        y: [
          { required: true, message: "Y坐标/纬度不能为空", trigger: "blur" }
        ],
        leftFrontSupportHeight: [
          { required: true, message: "左前方撑脚高度不能为空", trigger: "blur" }
        ],
        rightFrontSupportHeight: [
          { required: true, message: "右前方撑脚高度不能为空", trigger: "blur" }
        ],
        leftRearSupportHeight: [
          { required: true, message: "左后方撑脚高度不能为空", trigger: "blur" }
        ],
        rightRearSupportHeight: [
          { required: true, message: "右后方撑脚高度不能为空", trigger: "blur" }
        ],
        drillingDepth: [
          { required: true, message: "钻深不能为空", trigger: "blur" }
        ],
        drillingSpeed: [
          { required: true, message: "钻速不能为空", trigger: "blur" }
        ],
        current: [
          { required: true, message: "电流不能为空", trigger: "blur" }
        ],
        eastSpeed: [
          { required: true, message: "桩机东向速度不能为空", trigger: "blur" }
        ],
        northSpeed: [
          { required: true, message: "桩机北向速度不能为空", trigger: "blur" }
        ],
        verticalSpeed: [
          { required: true, message: "桩机天向速度不能为空", trigger: "blur" }
        ],
        drillingType: [
          { required: true, message: "钻孔状态 0 停止 1 开始不能为空", trigger: "change" }
        ],
        retreatType: [
          { required: true, message: "钻孔提钻 0 停止 1 开始不能为空", trigger: "change" }
        ],
        pumpType: [
          { required: true, message: "泵送状态 0 停止 1 开始不能为空", trigger: "change" }
        ],
        expandedDiameter: [
          { required: true, message: "扩底直径不能为空", trigger: "blur" }
        ],
        pumpTimes: [
          { required: true, message: "泵送次数不能为空", trigger: "blur" }
        ],
        tension: [
          { required: true, message: "拉力不能为空", trigger: "blur" }
        ],
        walkingSpeed: [
          { required: true, message: "行走速度不能为空", trigger: "blur" }
        ],
        revolutionsPerMinute: [
          { required: true, message: "转速不能为空", trigger: "blur" }
        ],
        trackAngle: [
          { required: true, message: "履带角度不能为空", trigger: "blur" }
        ],
        frontBackAngleDeviation: [
          { required: true, message: "前后角度不能为空", trigger: "blur" }
        ],
        leftRightAngleDeviation: [
          { required: true, message: "左右角度不能为空", trigger: "blur" }
        ],
        positioningStatus: [
          { required: true, message: "定位状态不能为空", trigger: "blur" }
        ],
        antennaStatus: [
          { required: true, message: "天线状态不能为空", trigger: "blur" }
        ],
        pressureStatus: [
          { required: true, message: "压力状态不能为空", trigger: "blur" }
        ],
        weightStatus: [
          { required: true, message: "重量状态不能为空", trigger: "blur" }
        ],
        innerRodCurrent: [
          { required: true, message: "内钻杆电流不能为空", trigger: "blur" }
        ],
        innerRodRpm: [
          { required: true, message: "内钻杆转速不能为空", trigger: "blur" }
        ],
        advanceRetreatSpeed: [
          { required: true, message: "进提钻速度不能为空", trigger: "blur" }
        ],
        outerRodSpeed: [
          { required: true, message: "外钻杆速度不能为空", trigger: "blur" }
        ],
        concretePumpPressure: [
          { required: true, message: "泵送混凝土压力不能为空", trigger: "blur" }
        ],
        concretePumpWeight: [
          { required: true, message: "泵送混凝土重量不能为空", trigger: "blur" }
        ],
        receptionTime: [
          { required: true, message: "接收时间不能为空", trigger: "blur" }
        ],
        creatorId: [
          { required: true, message: "创建人id不能为空", trigger: "blur" }
        ],
        creatorName: [
          { required: true, message: "创建人姓名不能为空", trigger: "blur" }
        ],
        lastUpdaterId: [
          { required: true, message: "最后修改人id不能为空", trigger: "blur" }
        ],
        lastUpdaterName: [
          { required: true, message: "最后修改人姓名不能为空", trigger: "blur" }
        ],
        lastUpdateTime: [
          { required: true, message: "最后修改时间不能为空", trigger: "blur" }
        ],
        pileCode: [
          { required: true, message: "桩位统计编码不能为空", trigger: "blur" }
        ]
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询桩机运行记录列表 */
    getList() {
      this.loading = true;
      listPilingMachineRecord(this.queryParams).then(response => {
        this.pilingMachineRecordList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        projectId: null,
        equipmentId: null,
        pileNo: null,
        operationMode: null,
        azimuthAngle: null,
        elevationAngle: null,
        rollingAngle: null,
        longitude: null,
        latitude: null,
        x: null,
        y: null,
        leftFrontSupportHeight: null,
        rightFrontSupportHeight: null,
        leftRearSupportHeight: null,
        rightRearSupportHeight: null,
        drillingDepth: null,
        drillingSpeed: null,
        current: null,
        eastSpeed: null,
        northSpeed: null,
        verticalSpeed: null,
        drillingType: null,
        retreatType: null,
        pumpType: null,
        expandedDiameter: null,
        pumpTimes: null,
        tension: null,
        walkingSpeed: null,
        revolutionsPerMinute: null,
        trackAngle: null,
        frontBackAngleDeviation: null,
        leftRightAngleDeviation: null,
        positioningStatus: "0",
        antennaStatus: "0",
        pressureStatus: "0",
        weightStatus: "0",
        innerRodCurrent: null,
        innerRodRpm: null,
        advanceRetreatSpeed: null,
        outerRodSpeed: null,
        concretePumpPressure: null,
        concretePumpWeight: null,
        receptionTime: null,
        creatorId: null,
        creatorName: null,
        lastUpdaterId: null,
        lastUpdaterName: null,
        lastUpdateTime: null,
        pileCode: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加桩机运行记录";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getPilingMachineRecord(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改桩机运行记录";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updatePilingMachineRecord(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addPilingMachineRecord(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除桩机运行记录编号为"' + ids + '"的数据项？').then(function () {
        return delPilingMachineRecord(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => { });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('pile/pilingMachineRecord/export', {
        ...this.queryParams
      }, `pilingMachineRecord_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
